load("@rules_cc//cc:cc_library.bzl", "cc_library")
load(":boost_test_suite.bzl", "boost_test_suite")

cc_library(
    name = "boost.heap_test_lib",
    testonly = True,
    srcs = glob(["**/*_tests.cpp"]),
    hdrs = glob(["**/*_tests.hpp"]),
    visibility = ["//:__subpackages__"],
    deps = [
        "//:boost.heap",
        "@boost.container",
        "@boost.foreach",
        "@boost.test//:unit_test_main",
    ],
)

boost_test_suite(
    name = "gen_boost.heap_test_targets",
    cc_srcs = glob(
        ["*_test.cpp"],
        exclude = [
            # We don't need this test for Bazel as the parse_headers feature
            # already checks that headers are self-contained.
            "self_contained_header.cpp",
        ],
    ),
    header_srcs = glob(["*.hpp"]),
    deps = [":boost.heap_test_lib"],
)
